package main

import (
	"context"
	"fmt"
	"github.com/go-redis/redis/v8"
)

var ctx = context.Background()

func main() {
	rdb := redis.NewClient(&redis.Options{
		Addr:         "81.68.186.20:6379",
		Password:     "ffdd2021@",
		DB:           0,
		MinIdleConns: 10,
	})
	defer rdb.Close()

	//*获取所有的key*/
	keys, err := rdb.Keys(ctx, "*").Result()
	if err != nil {
		panic(err)
	}
	fmt.Println(keys)

}
